-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split URL Helper tests #4672
Split URL Helper tests #4672
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just nitpicking on my end. Can you make the name of the tests with Url in it? Like BaseTest to BaseUrlTest.
Glad to! Any idea why test are flipping out? |
I'm not sure. It seems the sqlite3 and intl extensions are not working. |
I'm baffled about these tests. I reran them three times and they keep having these same weird errors, even though all I did was split one file into four. Other PRs have run successful tests since so I'm not sure what to think of it. |
I've seen cases where tests relied on $_SERVER or $_SESSION changes that were happening in a previous file. When that file was ran on it's own its fine, but ran in sequence and it didn't work. In those cases I was able to fix it clearing the session (or whatever) during the test setUp. Not saying that's the case here, but something is definitely going on. The autoloader isn't getting reset somewhere, though I don't know if it matters:
|
I don't know if it'll make sense, but try resetting the mocked configs after each test? |
Okay good suggestions - I will look at what changed and try mimicking. |
That wasn't it - I didn't change the staging at all in this phase. They all reset |
Try closing and reopening I guess. |
try backupGlobals enabled for all tests. I see the original test but the split tests do not except for one |
Ooo good catch! I bet that is it, that would make total sense. |
Description
In preparation for "Stage Two" of URI rework (targeting URL Helper) this PR splits apart the massive URL Helper test into 4 different files to make it easier to control
$_SERVER
manipulations and minimize overlap. These tests will have significant changes in the next PR so I wanted to split them out first to make it clear what actually is changed.The only content updates were to
testCurrentURLReturnsBasicURL()
andtestCurrentURLReturnsObject()
which were actually bugged but didn't show it because$this->config
was not injected.Note: I realize there is significant code overlap now in the staging methods but these also are likely to change in the next PR so I have not consolidated them on purpose.
Checklist: